package com.autocloud.model.security;

import com.autocloud.model.Base;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @author zhongwb
 * @version 1.0
 * @description
 * @date 2019/12/14 3:27 下午
 */
@Entity
@Data
@Accessors(chain = true)
@Table(name = "sys_organization_account")
public class Account extends Base {

    private String organization;
    private String station;
    private int level;
    private String person;
    private String pwd;
    private String account;

    public static Account of(String title, String name, String pwd, String id, String person, String organization, String station) {
        Account account = new Account();
        account.setTitle(title);
        account.setId(id);
        account.setPerson(person);
        account.setOrganization(organization);
        account.setStation(station);
        account.setAccount(name);
        account.setPwd(pwd);
        account.setRanks(getRankIncrement());
        return account;
    }


}
